//package com.demo.controller;
//
//
//import cn.hutool.core.util.IdUtil;
//import com.util.config.HttpResult;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import javax.validation.Valid;
//import java.util.concurrent.CountDownLatch;
//
///**
//* 商品表的操作接口
//*/
//@Slf4j
//@RestController
//@RequestMapping("product")
//public class ProductController {
//
//
//    @Resource
//    private OrderService orderService;
//
//    /**
//    * 添加或者修改商品表
//    *
//    * @return
//    */
//    @PostMapping("save")
//    public HttpResult saveProduct() {
//        log.info(Thread.currentThread().getName()+",进入方法");
//
//        CountDownLatch countDownLatch = new CountDownLatch(200);
//        for (int i = 0; i < 200; i++) {
//            new Thread(() -> {
//                try {
//                    countDownLatch.await();
//                    orderService.saveOrder();
////                    HttpUtil.post("http://localhost:19017/product/save");
//                } catch (InterruptedException e){
//
//                }
//            }).start();
//            countDownLatch.countDown();
//        }
//        return HttpResult.succ("OK");
//    }
//
//
//}
